import request from '@/utils/request'

//订单列表
export function fetchList(params) {
  return request({
    url:'/shop/order/list',
    method:'get',
    params:params
  })
}

//订单详情
export function orderDetail(orderId) {
  return request({
    url:'/shop/order/detail',
    method:'get',
    params:{orderId:orderId}
  })
}

//订单发货页面内容
export function waitSendInfo(orderId) {
  return request({
    url:'/shop/order/waitSendInfo',
    method:'get',
    params:{orderId:orderId}
  })
}


//订单发货提交
export function deliveryOrder(data) {
  return request({
    url:'/shop/order/send',
    method:'post',
    data:data
  });
}

//更改销售订单成已支付
export function updatePay(orderId) {
  return request({
    url:'/shop/order/pay',
    method:'post',
    data:{orderId:orderId}
  });
}

//获取订单物流动态
export function getLogistics(orderId) {
  return request({
    url:'/shop/order/logistics',
    method:'get',
    params:{orderId:orderId}
  });
}

//订单列表导出
export function exportOrder(params) {
  return request({
    url:'/shop/order/export',
    method:'get',
    params:params
  });
}


//订单批量发货
export function batchSend(data) {
  return request({
    url:'/shop/order/batchSend',
    method:'post',
    data:data
  });
}


//订单更新物流
export function postMockShipLog(data) {
  return request({
    url:'/shop/order/mockShipLog',
    method:'post',
    data:data
  });
}

//仓库订单列表
export function logisticsOrders(data) {
  return request({
    url:'/orders/logisticsOrders',
    method:'post',
    data:data
  });
}

//桐鑫仓库订单列表
export function txLogisticsOrders(data) {
  return request({
    url:'/tongxin/logisticsOrders',
    method:'post',
    data:data
  });
}

//日程仓库订单列表
export function rcLogisticsOrders(data) {
  return request({
    url:'/richeng/logisticsOrders',
    method:'post',
    data:data
  });
}

//获取未排货的合同商品列表
export function planOrderGoodsList(data) {
  return request({
    url:'/plan/orderGoodsList',
    method:'post',
    data:data
  });
}

//获取已排货的商品列表
export function planGoodsListScheduled(data) {
  return request({
    url:'/plan/planGoodsList',
    method:'post',
    data:data
  });
}

//获取排货单详情
export function planBillInfo(data) {
  return request({
    url:'/plan/billInfo',
    method:'post',
    data:data
  });
}

//取消排货
export function cancelGoodsPlan(data) {
  return request({
    url:'/plan/cancelGoodsPlan',
    method:'post',
    data:data
  });
}

//排货单填写司机信息
export function inputDriverInfo(data) {
  return request({
    url:'/plan/inputDriverInfo',
    method:'post',
    data:data
  });
}

//排货单填写司机信息
export function editPlanGoods(data) {
  return request({
    url:'/plan/editPlanGoods',
    method:'post',
    data:data
  });
}


//销售排货回显
export function orderGoodsDetailPlan(data) {
  return request({
    url:'/plan/orderGoodsDetail',
    method:'post',
    data:data
  });
}


//查询销售排货关联单
export function needTakePurchaseGoods(data) {
  return request({
    url:'/plan/needTakePurchaseGoods',
    method:'post',
    data:data
  });
}

//排货仓库列表
export function warehouseListPlan(data) {
  return request({
    url:'/plan/warehouseList',
    method:'post',
    data:data
  });
}


//销售合同排货提交
export function planOrderGoods(data) {
  return request({
    url:'/plan/planOrderGoods',
    method:'post',
    data:data
  });
}


//采购合同排货提交
export function planPurchaseGoods(data) {
  return request({
    url:'/plan/planPurchaseGoods',
    method:'post',
    data:data
  });
}





//采购单/代加工单商品明细
export function purchaseGoodsDetail(data) {
  return request({
    url:'/plan/purchaseGoodsDetail',
    method:'post',
    data:data
  });
}


//模糊查询采购单号/代加工单号
export function suggestOrderSn(data) {
  return request({
    url:'/plan/suggestOrderSn',
    method:'post',
    data:data
  });
}

//排货单明细确认出库操作
export function planGoodsOperate(data) {
  return request({
    url:'/plan/planGoodsOperate',
    method:'post',
    data:data
  });
}


//获取指定排货单商品对应的发货单商品
export function getDeliverGoods(data) {
  return request({
    url:'/plan/getDeliverGoods',
    method:'post',
    data:data
  });
}


//排货单确认入库操作
export function checkStockIn(data) {
  return request({
    url:'/plan/checkStockIn',
    method:'post',
    data:data
  });
}


//未安排已发货明细列表
export function directDeliverGoods(data) {
  return request({
    url:'/plan/directDeliverGoods',
    method:'post',
    data:data
  });
}


//取消发货
export function cancelGoodsDeliver(data) {
  return request({
    url:'/plan/cancelGoodsDeliver',
    method:'post',
    data:data
  });
}


//获取打印内容
export function getPrintContent(data) {
  return request({
    url:'/plan/getPrintContent',
    method:'post',
    data:data
  });
}


//获取确定安排
export function checkGoodsPlan(data) {
  return request({
    url:'/plan/checkGoodsPlan',
    method:'post',
    data:data
  });
}



//商品厂家列表
export function factoryListPlan(data) {
  return request({
    url:'/plan/factoryList',
    method:'post',
    data:data
  });
}


//商品厂家采购权限设置
export function factorySet(data) {
  return request({
    url:'/plan/factorySet',
    method:'post',
    data:data
  });
}


//同步SAP商品厂家
export function syncFactoryList(data) {
  return request({
    url:'/plan/syncFactoryList',
    method:'post',
    data:data
  });
}


//排货单确认已提货
export function checkBillTake(data) {
  return request({
    url:'/plan/checkBillTake',
    method:'post',
    data:data
  });
}


//排货是否需要提示
export function checkPlanOrderIsPaid(data) {
  return request({
    url:'/plan/checkPlanOrderIsPaid',
    method:'post',
    data:data
  });
}


//收货确认函列表
export function printDeliverList(data) {
  return request({
    url:'/deliver/printDeliverList',
    method:'post',
    data:data
  });
}

//收货确认函合并打印
export function batchPrint(data) {
  return request({
    url:'/deliver/batchPrint',
    method:'post',
    data:data
  });
}


//收货确认函合并回单
export function  batchReceived(data) {
  return request({
    url:'/deliver/batchReceived',
    method:'post',
    data:data
  });
}

// 更新收货确认函打印次数
export function updateBatchPrint(data) {
  return request({
    url:'/deliver/updateBatchPrint',
    method:'post',
    data
  })
}


// 合同明细统计
export function detailListStatistics(data) {
  return request({
    url:'/orders/detailListStatistics',
    method:'post',
    data
  })
}

// 生成资金成本
export function addCapitalCost(data) {
  return request({
    url:'/order/addCapitalCost',
    method:'post',
      data
    })
  }


// 成长分析列表
export function getTargetVolumeList(data) {
  return request({
    url:'/user/getTargetVolumeList',
    method:'post',
    data
  })
}


// 获取公司列表
export function getCompanyList(data) {
  return request({
    url:'/warehouse/companyList',
    method:'post',
    data
  })
}

// 获取仓库列表
export function getWarehouseList(data) {
  return request({
    url:'/warehouse/warehouseList',
    method:'post',
    data
  })
}

// 获取审批订单详情
export function getFinanceOrderInfo(data) {
  return request({
    url:'/finance/orderInfo',
    method:'post',
    data
  })
}

// 货权列表
export function getOwnerShipList(data) {
  return request({
    url:'/psMerge/ownerShipList',
    method:'post',
    data
  })
}

// 牌号分类
export function getGoodsClassList(data) {
  return request({
    url:'/psMerge/goodsClassList',
    method:'post',
    data
  })
}

// 货权单转移
export function ownerShipMove(data) {
  return request({
    url:'/psMerge/ownerShipMove',
    method:'post',
    data
  })
}

// 货权单转移确认
export function ownerShipCheck(data) {
  return request({
    url:'/psMerge/ownerShipCheck',
    method:'post',
    data
  })
}

// 货权单日志
export function ownerShipLog(data) {
  return request({
    url:'/psMerge/ownerShipLog',
    method:'post',
    data
  })
}

// 获取我的待绑定货权的订单商品
export function myOrderList(data) {
  return request({
    url:'/psMerge/myOrderList',
    method:'post',
    data
  })
}

// 采销融合归属毛利报表
export function getProfitList(data) {
  return request({
    url:'/psMerge/profitList',
    method:'post',
    data
  })
}

// 采销融合人员列表
export function groupUserListAPI(data) {
  return request({
    url:'/psMerge/groupUserList',
    method:'post',
    data
  })
}

//采销融合配置项
export function groupSetListAPI(data) {
  return request({
    url:'/psMerge/settingList',
    method:'post',
    data
  })
}

// 编辑 新增采销人员
export function editGroupUserAPI(data) {
  return request({
    url:'/psMerge/editGroupUser',
    method:'post',
    data
  })
}

// 删除采销人员
export function delGroupUserAPI(data) {
  return request({
    url:'/psMerge/delGroupUser',
    method:'post',
    data
  })
}

// 货权单修改市场价
export function changeMarketPrice(data) {
  return request({
    url:'/psMerge/changeMarketPrice',
    method:'post',
    data
  })
}

// 获取提货单打印图片（二维码）
export function getPrintImage(data) {
  return request({
    url:'/plan/getPrintImage',
    method:'post',
    data
  })
}

// 提货单地址修改
export function editReceiveAddress(data) {
  return request({
    url:'/plan/editReceiveAddress',
    method:'post',
    data
  })
}


export function saleTarget(data) {
  return request({
    url:'/psMerge/saleTarget',
    method:'post',
    data
  })
}

export function saleTargetSet(data) {
  return request({
    url:'/psMerge/saleTargetSet',
    method:'post',
    data
  })
}
//采销毛利合计
export function psProfitSummary(data) {
  return request({
    url:'/psMerge/psProfitSummary',
    method:'post',
    data
  })
}

//承况汇率
export function psMergeConfig(data) {
  return request({
    url:'/psMerge/config',
    method:'post',
    data
  })
}

//排货标记
export function editTagContent(data) {
  return request({
    url:'/plan/editTagContent',
    method:'post',
    data
  })
}

//排货标记
export function ownershipMoveReport(data) {
  return request({
    url:'/psMerge/ownershipMoveReport',
    method:'post',
    data
  })
}


//获取适配销售订单列表
export function getCrmOrderList(data) {
  return request({
    url:'/purchase/getCrmOrderList',
    method:'post',
    data
  })
}

//采购订单执行报表
export function getOrderReportList(data) {
  return request({
    url:'/purchase/getOrderReportList',
    method:'post',
    data
  })
}

//导出采购订单执行报表
export function exportOrderReport(data) {
  return request({
    url:'/purchase/exportOrderReport',
    method:'post',
    data
  })
}

//销售订单执行报表
export function saleOrderReport(data) {
  return request({
    url:'/report/saleOrderReport',
    method:'post',
    data
  })
}


//询盘销量分析报表
export function inquirySalesVolumeReport(data) {
  return request({
    url:'/finance/inquirySalesVolumeReport',
    method:'post',
    data
  })
}

//发货开票缓急统计
export function getInvoiceUrgencyList(data) {
  return request({
    url:'/deliver/getInvoiceUrgencyList',
    method:'post',
    data
  })
}

//标记、修改发货开票缓急
export function setInvoiceUrgency(data) {
  return request({
    url:'/deliver/setInvoiceUrgency',
    method:'post',
    data
  })
}

//发货延迟反馈标记列表
export function getDelayedFeedback(data) {
  return request({
    url:'/order/getDelayedFeedback',
    method:'post',
    data
  })
}

//标记，修改发货延迟反馈
export function setDelayedFeedback(data) {
  return request({
    url:'/order/setDelayedFeedback',
    method:'post',
    data
  })
}

//获取客户降价违约次数
export function getCustomerDefaultNum(data) {
  return request({
    url:'/customer/getCustomerDefaultNum',
    method:'post',
    data
  })
}


export function inquiryTips(data) {
  return request({
    url:'/inquiry/tips',
    method:'post',
    data
  })
}

//预售订单延迟关闭申请
export function delaySendApply(data) {
  return request({
    url:'/orderCheck/delaySendApply',
    method:'post',
    data
  })
}

//后结算订单商品详情
export function delaySettleOrderInfo(data) {
  return request({
    url:'/order/delaySettleOrderInfo',
    method:'post',
    data
  })
}

//销售订单后结算申请提交
export function delaySettleApply(data) {
  return request({
    url:'/order/delaySettleApply',
    method:'post',
    data
  })
}
